<?php

class Form_DepartmentForm extends Form_Custom_General {
 
    public function init() {
        
        $dep_id = $this->createElement('hidden', 'dep_id')
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60"));
        $this->addElement($dep_id);

        $dep_name = $this->createElement('text', 'dep_name')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("dep_required_name"))))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60", "class" => "span6", "placeholder" => $this->translateObj->translate("dep_frm_name")));
        $this->addElement($dep_name);

      
     
        /*$build_id = $this->createElement('select', 'build_id')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array( "class" => "select2"))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("dep_required_building"))));
        $this->addElement($build_id);*/
        
        $site_id = $this->createElement('select', 'site_id')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array( "class" => "select2"))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("build_required_site"))));
        $this->addElement($site_id);

        $dep_comment = $this->createElement('textarea', 'dep_comment')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("dep_required_comment"))))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array("size" => "60", "cols" => "50", "rows" => "3", "class" => "span6", "placeholder" => $this->translateObj->translate("dep_frm_comment")));
        $this->addElement($dep_comment);

       
        $dep_status = $this->createElement('select', 'dep_status')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("dep_required_status"))));
        $this->addElement($dep_status);


        $submit = $this->createElement('submit', 'Save')
                ->setAttribs(Array('title' => "Save changes", 'class' => "btn-glow primary"))
                 ->setLabel($this->translateObj->translate("frm_save"));
        $this->addElement($submit);


        $reset = $this->createElement('reset', 'Reset')
                ->setAttribs(Array('title' => "Save changes and continue to edit", 'class' => "btn-glow primary"))
                 ->setLabel($this->translateObj->translate("frm_reset"));
        $this->addElement($reset);
    }

}